﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using blackhouse.BlackApart.Data;

namespace blackhouse.BlackApart.Business.Apartments {
    public class ApartmentOptionField {

        #region Properties

        public string Title { get; set; }
        public ApartmentOptionFieldVariant Variant { get; set; }
        public string Description { get; set; }

        #endregion

        #region Constructors

        public ApartmentOptionField(string title, int variant, string description) {
            this.Title = title;
            this.Variant = (ApartmentOptionFieldVariant)variant;
            if (this.Variant == ApartmentOptionFieldVariant.Undefined)
                this.Variant = ApartmentOptionFieldVariant.No;
            this.Description = description;
        }

        public ApartmentOptionField(string title, ApartmentOptionFieldVariant variant, string description) : this(title, (int)variant, description) { }

        public ApartmentOptionField(ApartmentOptionFieldData data) : this(data.Title, data.Variant, data.Description) { }

        #endregion

    }

    public enum ApartmentOptionFieldVariant {
        Undefined = 0,
        Yes = 1,
        No = 2,
        Option = 3
    }
}
